<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<h2 class='aui-gutter-column-md'>{{ 'explore_snapshot_detection_label' | i18n }}</h2>
<div class="list-container" width="100%">
    <lv-pro-table #dataTable [config]="tableConfig" [data]="tableData"></lv-pro-table>
</div>
<ng-template #statisticsTpl let-item>
    <span class="statistics-tag protected-background protected"
        (click)="getRepicasDetail(item)">
        <span class="statistics-label">{{'common_protected_label' | i18n}}</span>
        <span class='count-label'>{{item.protectedCount > 999 ? '999+' : item.protectedCount}}</span>
    </span>
    <span class="statistics-tag unprotected-background"
        (click)="getRepicasDetail(item)">
        <span class="statistics-label">{{'common_unprotected_label' | i18n}}</span>
        <span class='count-label'>{{item.unprotectedCount > 999 ? '999+' : item.unprotectedCount}}</span>
    </span>
</ng-template>

<ng-template #lunStatisticsTpl let-item>
    <span class="statistics-tag protected-background protected"
        (click)="getRepicasDetail(item)">
        <span class="statistics-label">{{'common_protected_label' | i18n}}</span>
        <span class='count-label'>{{item.protectedCountLun > 999 ? '999+' : item.protectedCountLun}}</span>
    </span>
    <span class="statistics-tag unprotected-background"
        (click)="getRepicasDetail(item)">
        <span class="statistics-label">{{'common_unprotected_label' | i18n}}</span>
        <span class='count-label'>{{item.unprotectedCountLun > 999 ? '999+' : item.unprotectedCountLun}}</span>
    </span>
</ng-template>
